package admin

import (
	"context"
	"server/internal/service"

	"server/api/admin/system"
)

func (c *ControllerSystem) FileUpload(ctx context.Context, req *system.FileUploadReq) (res *system.FileUploadRes, err error) {
	res = new(system.FileUploadRes)
	res.Detail, err = service.File().FileUpload(ctx, req.File, req.StorageType, req.FileSubject, req.CategoryId)
	return
}
